
import Vue from 'vue'
import Router from 'vue-router'
// 引入组件
import Home from './views/Home.vue'
import Detail from './views/Detail.vue'
Vue.use(Router)
// 路由与组件绑定
export default new Router({
    routes: [ {
        name:'home',
        path: '/',
        component: Home
    },{
        name:'detail',
        path: '/detail',
        component: Detail,
    }]
})